const mongoose = require('mongoose')
let Schema = mongoose.Schema
let resourcesSchema = new Schema({
  _id: {
    type:String,
    required:true
  },
  img_url: {
    type:String,
    required:true
  },
  date:{
    type:Date,
    default:Date.now()
  },
  category_id:{
    type:String,
    required:true,
    ref:'resources_category'
  }
})
//创建Model对象
let resources = mongoose.model('resources', resourcesSchema)
module.exports = resources 